wx.miniProgram.getEnv(function (res) {
    document.querySelector('#dev').innerText = res.miniprogram;
    let x = window.localStorage.getItem('key')
    document.querySelector('#localStorage').innerText = JSON.stringify(x||'没有');
     window.localStorage.setItem('key','web页面')
    let t =  window.localStorage.getItem('key')
    document.querySelector('#localStorage').innerText = JSON.stringify(t||'没有');
    wx.miniProgram.postMessage({ data: {foo: 'bar'} })
    $('#share').click(function () {
        location.reload()


        // wx.miniProgram.postMessage({ data: {foo: '4123412341234'} })
        // wx.miniProgram.navigateTo({url: '/pages/index/index'})
    })
})
